package cn.lili.modules.supplier.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.supplier.entity.dos.SupplierAuditRecord;
import cn.lili.modules.supplier.fallback.SupplierAuditRecordFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        name = ServiceConstant.SUPPLIER_SERVICE,
        contextId = "supplier-audit-record",
        fallback = SupplierAuditRecordFallback.class)
public interface SupplierAuditRecordClient {

    @GetMapping("/feign/supplierAudit/{supplierId}/getSupplierAudit")
    SupplierAuditRecord getBySupplierId (@PathVariable String supplierId);

    @PostMapping("/feign/supplierAudit/update")
    boolean update(@RequestBody SupplierAuditRecord supplierAuditRecord);
}
